<template>
  <router-view></router-view>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { themeStore } from '@renderer/store/theme'
import { settingStore } from '@renderer/store/setting'
const set = settingStore()
const themes = themeStore()


onMounted(() => {
  let myApi = window.api as any
  themes.setGlobal()
  myApi.onUpdateStorage((_, data) => {
    set.$state = JSON.parse(data)
  })
})
</script>

<style lang="scss">
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html,
body {
  background-color: var(--back);
  color: var(--text);
}
</style>